<div class="contexts view">
<h2><?php  __('Context');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $context['Context']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $context['Context']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Suggestion'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($context['Suggestion']['id'], array('controller' => 'suggestions', 'action' => 'view', $context['Suggestion']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Widget'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($context['Widget']['name'], array('controller' => 'widgets', 'action' => 'view', $context['Widget']['id'])); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Context', true), array('action' => 'edit', $context['Context']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete Context', true), array('action' => 'delete', $context['Context']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $context['Context']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Contexts', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Context', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Suggestions', true), array('controller' => 'suggestions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Suggestion', true), array('controller' => 'suggestions', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Widgets', true), array('controller' => 'widgets', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Widget', true), array('controller' => 'widgets', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Users');?></h3>
	<?php if (!empty($context['User'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Group Id'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Password'); ?></th>
		<th><?php __('Active'); ?></th>
		<th><?php __('Language'); ?></th>
		<th><?php __('Context Id'); ?></th>
		<th><?php __('Utilization Rate'); ?></th>
		<th><?php __('Photo'); ?></th>
		<th><?php __('First Name'); ?></th>
		<th><?php __('Last Name'); ?></th>
		<th><?php __('Gender'); ?></th>
		<th><?php __('Address'); ?></th>
		<th><?php __('Country'); ?></th>
		<th><?php __('Administrative Area Level 1'); ?></th>
		<th><?php __('Administrative Area Level 2'); ?></th>
		<th><?php __('Latitude'); ?></th>
		<th><?php __('Longitude'); ?></th>
		<th><?php __('Distance'); ?></th>
		<th><?php __('Out Of Date'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($context['User'] as $user):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $user['id'];?></td>
			<td><?php echo $user['group_id'];?></td>
			<td><?php echo $user['email'];?></td>
			<td><?php echo $user['password'];?></td>
			<td><?php echo $user['active'];?></td>
			<td><?php echo $user['language'];?></td>
			<td><?php echo $user['context_id'];?></td>
			<td><?php echo $user['utilization_rate'];?></td>
			<td><?php echo $user['photo'];?></td>
			<td><?php echo $user['first_name'];?></td>
			<td><?php echo $user['last_name'];?></td>
			<td><?php echo $user['gender'];?></td>
			<td><?php echo $user['address'];?></td>
			<td><?php echo $user['country'];?></td>
			<td><?php echo $user['administrative_area_level_1'];?></td>
			<td><?php echo $user['administrative_area_level_2'];?></td>
			<td><?php echo $user['latitude'];?></td>
			<td><?php echo $user['longitude'];?></td>
			<td><?php echo $user['distance'];?></td>
			<td><?php echo $user['out_of_date'];?></td>
			<td><?php echo $user['created'];?></td>
			<td><?php echo $user['modified'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'users', 'action' => 'view', $user['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'users', 'action' => 'edit', $user['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'users', 'action' => 'delete', $user['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Widgets');?></h3>
	<?php if (!empty($context['Widget'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Suggestion Id'); ?></th>
		<th><?php __('Code'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($context['Widget'] as $widget):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $widget['id'];?></td>
			<td><?php echo $widget['name'];?></td>
			<td><?php echo $widget['suggestion_id'];?></td>
			<td><?php echo $widget['code'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'widgets', 'action' => 'view', $widget['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'widgets', 'action' => 'edit', $widget['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'widgets', 'action' => 'delete', $widget['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $widget['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Widget', true), array('controller' => 'widgets', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
